<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="MvcContrib.FluentHtml.ModelViewPage<Universum.Views.Classes.ClassesIndexViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Universum - Your classes
</asp:Content>
<asp:Content ContentPlaceHolderID="Breadcrumbs" ID="BreadcrumbsContent" runat="server">
	<%=Html.Breadcrumb().Home().AppendText("Your Classes").End() %>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
	<h2>
		Your classes</h2>
	<%--<div class="span-22">--%>
		<%
			using (Html.BeginForm<ClassesController>(c => c.CreateClass()))
			{
				Writer.Write(this.SubmitButton("Create a new class"));
			}
		%>
		<% 
			if (this.Model.Classes.Count == 0)
			{
		%>
		<span><em>Currently you don't have any classes defined. </em></span>
		<% 
						
			}
			else
			{
				this.Model.Classes.ToList().ForEach(@class =>
					Html.RenderPartial("_Class", @class)
					);
			}
		
		%>
	<%--</div>--%>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptPlaceHolder" runat="server">
	<% Html.RenderPartial("EditorAndDateUserControl"); %>

	<script type="text/javascript">
		$(function() {
			$(".class-description").accordion(

		{ active: false, autoHeight: false,
			collapsible: true
		}

		);

		});
	</script>

</asp:Content>
